Repository navigation
Write the files of the unit tests to temporary directories - #638
Merged
Merged
Conversation
yguclu
marked this pull request as ready for review
November 2, 2026 12:19
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
🟢 Coverage 57.81% diff coverage · -0.02% coverage variation
Metric Results Coverage variation ✅ -0.02% coverage variation Diff coverage ✅ 57.81% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (4868f6c) 52356 33650 64.27% Head commit (d83041e) 104622 (+52266) 67224 (+33574) 64.25% (-0.02%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#638) 64 37 57.81% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
yguclu
marked this pull request as draft
November 2, 2026 14:31
yguclu
marked this pull request as ready for review
November 2, 2026 17:42
kvrigor
reviewed
Nov 3, 2026
kvrigor
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With pytest 9.2.0, pytest-xdist 3.8.0 ignores the
xdist_groupmark, so--dist loadgroupno longer keeps the tests of a group on the same worker. The post-processing tests, which wrote files with fixed names to the working directory, could then overwrite or delete each other's files, and failed randomly in CI (fixes #637). To prevent similar problems, the other unit tests which wrote files to the working directory (or to the test folder) now use temporary directories as well.tmp_pathfixture, or tompi_tmp_pathin the MPI tests, and remove thexdist_groupmarkers and the manual cleanup; intest_tensor.py, the image compared with the reference is saved to a temporary directory instead of the test folder--dist loadgroupfrom the commandpsydac test, as no test usesxdist_groupany more (the coverage step on macOS never used it)Locally, with pytest 9.2.0 and
-n auto, the previous versions ofpsydac/api/tests/test_postprocessing.pyandpsydac/api/tests/test_build_derham_mapping.pyfailed 20 to 29 of 51 tests in each run, while the new versions passed all of them in three runs. The changed MPI tests also pass (225 post-processing tests and 65 tests intest_eval_fields_parallel.pyandtest_discrete_mapping.pyon 2 processes, andtest_tensor.pyon 4 processes).